package com.da.javatest.leetCode;

import java.util.ArrayList;
import java.util.List;

/**
 * @author chenlida
 * @date 2019/1/14 17:33
 * @description
 */
public class Code961 {
    public int repeatedNTimes(int[] A) {
        List<Integer> l = new ArrayList<>();
        for (int i = 0; i < A.length; i++) {
            if (l.contains(A[i])) {
                return A[i];
            }
            l.add(A[i]);
        }
        return -1;
    }
}
